import _Event from "./event";

const {ccclass, property} = cc._decorator;
@ccclass
export default class view extends cc.Component {
    private m_Event: _Event = new _Event();
    public on(name,func, target?){
        return this.m_Event.on(name,func, target);
    }
    public once(name, func, target?){
        return this.m_Event.once(name, func, target);
    }
    public emit(name, ...args){
        return this.m_Event.emit(name, ...args);
    }
    public off(name, func){
        return this.m_Event.off(name, func);
    }
}